using System;
using System.Diagnostics;
using System.Collections.Generic;
using System.Text;

using Behemoth.SharePoint.Logging;

namespace TestULSLogging {
  public class Program {

    public static void Main(string[] args) {

      ULSTraceLogging log = new ULSTraceLogging();

      ULSTraceLogging.Default.Write("This is a test.");
      ULSTraceLogging.Default.Write("This is also a test.", TraceSeverity.Monitorable);

      Exception ex = new Exception("This is also a test.");
      try {
        throw ex;
      } catch (Exception ex2) {
        ULSTraceLogging.Default.Write(ex2);
      }

      SharepointTraceListener.EnsureListener(true, true);

      Debug.Assert(ex == null);
      Debug.Assert(ex == null, "There was an exception.");
      Debug.Assert(ex == null, "There was an exception.", "WOAH!");

      Trace.WriteIf(ex != null, ex);
      Trace.Write("Test! Test! Test!");
    }

  } // class
} // namespace
